package com.yy.permissions_general.module.system.mail.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 邮箱
 * </p>
 *
 * @author YY
 * @since 2022-02-10
 */
@Data
@TableName("sys_mail")
public class Mail extends Model<Mail> {

    private static final long serialVersionUID = 1L;

    /**
     * 邮件id(主键)
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * 收件人邮箱
     */
    @TableField("receiver")
    private String receiver;

    /**
     * 邮件主体
     */
    @TableField("subject")
    private String subject;

    /**
     * 邮件正文
     */
    @TableField("content")
    private String content;

    /**
     * 发送ID
     */
    @TableField(value ="create_id",fill = FieldFill.INSERT)
    private Integer createId;

    /**
     * 发送人
     */
    @TableField(value ="create_name",fill = FieldFill.INSERT)
    private String createName;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
